package cn.mugutu.finance.query;

import cn.mugutu.finance.domain.system.DictionaryDetail;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

@Data
public class DictionaryDetailQuery extends BaseQuery {

    private String name;
    private String typesSn;

    public DictionaryDetailQuery() {
        super(DictionaryDetail.class);
    }

    @Override
    public void addWhere() {
        if (StringUtils.isNotBlank(name)) {
            addWhere(" o.name like ? ", "%" + name + "%");
        }
        if (StringUtils.isNotBlank(typesSn)) {
            addWhere(" o.types.sn = ? ", typesSn);
        }
    }

}
